#!/bin/python3
# -*- coding:utf-8 -*-
"""
    微服务API模板
    Add By :陈狍子 e4ting@qq.com
"""
from flask_restful import Api,Resource

from app.flaskapp import webapp
from e4ting       import log
api = Api(webapp)


from v2.index.cpu import WebCPUInfo
api.add_resource(WebCPUInfo,
    "/api/v2/index/cpu",
    "/api/v2/index/cpu/<string:id>",
    )
log.info(""" /api/v2/index/cpu  /api/v2/index/cpu/<string:id>  WebCPUInfo""")

from v2.index.info import WebIndexInfo
api.add_resource(WebIndexInfo,
    "/api/v2/index/info",
    "/api/v2/index/info/<string:id>",
    )
log.info(""" /api/v2/index/info  /api/v2/index/info/<string:id>  WebIndexInfo""")

from v2.bot.uid import WebBotUid
api.add_resource(WebBotUid,
    "/api/v2/bot/uid",
    "/api/v2/bot/uid/<string:id>",
    )
log.info(""" /api/v2/bot/uid  /api/v2/bot/uid/<string:id>  WebBotUid""")

from v2.devel.yamls import WebYamlFormat
api.add_resource(WebYamlFormat,
    "/api/v2/devel/yamls",
    "/api/v2/devel/yamls/<string:id>",
    )
log.info(""" /api/v2/devel/yamls  /api/v2/devel/yamls/<string:id>  WebYamlFormat""")

from v2.image.url2img import Url2Img
api.add_resource(Url2Img,
    "/api/v2/image/url2img",
    "/api/v2/image/url2img/<string:id>",
    )
log.info(""" /api/v2/image/url2img  /api/v2/image/url2img/<string:id>  Url2Img""")

from v2.check.alive import WebAlive
api.add_resource(WebAlive,
    "/api/v2/check/alive",
    "/api/v2/check/alive/<string:id>",
    )
log.info(""" /api/v2/check/alive  /api/v2/check/alive/<string:id>  WebAlive""")

from v2.check.token import WebCheck
api.add_resource(WebCheck,
    "/api/v2/check/token",
    "/api/v2/check/token/<string:id>",
    )
log.info(""" /api/v2/check/token  /api/v2/check/token/<string:id>  WebCheck""")

from v2.data.statics import WebStatis
api.add_resource(WebStatis,
    "/api/v2/data/statics",
    "/api/v2/data/statics/<string:id>",
    )
log.info(""" /api/v2/data/statics  /api/v2/data/statics/<string:id>  WebStatis""")

from v2.data.detail import WebDataDetail
api.add_resource(WebDataDetail,
    "/api/v2/data/detail",
    "/api/v2/data/detail/<string:id>",
    )
log.info(""" /api/v2/data/detail  /api/v2/data/detail/<string:id>  WebDataDetail""")

from v2.poker.room import TexasRoom
api.add_resource(TexasRoom,
    "/api/v2/poker/room",
    "/api/v2/poker/room/<string:id>",
    )
log.info(""" /api/v2/poker/room  /api/v2/poker/room/<string:id>  TexasRoom""")

from v2.poker.player import TexasPlayer
api.add_resource(TexasPlayer,
    "/api/v2/poker/player",
    "/api/v2/poker/player/<string:id>",
    )
log.info(""" /api/v2/poker/player  /api/v2/poker/player/<string:id>  TexasPlayer""")

